package util;

/**
 * @Project : AlgorithmLearning
 * @Package : Leetcode
 * @File : ListNode.java
 * @Author : WangRuoyu
 * @Date 2023/10/20 21:21
 */

public class ListNode {
    public int val;
    public ListNode next;

    public ListNode(int val) {
        this.val = val;
    }

    public ListNode(int val, ListNode next) {
        this.val = val;
        this.next = next;
    }
}
//// 创建链表
//ListNode head = new ListNode(3, new ListNode(2, new ListNode(0, new ListNode(4))));

//// 输出链表元素
//ListNode p = sl.removeElements(head, x);
//while(p!=null){
//    System.out.println(p.val);
//    p=p.next;
//}